﻿using System.Collections.Generic;
using System.ComponentModel;
using GIMS.Def.Arguments;
using GIMS.Def.Flags;
using GIMS.Def.Settings;

namespace GIMS.Def.Operators
{
    public class ResizeOperator : Operator
    {
        private GeometryType possibleGeometryTypes = GeometryType.widthxheight | GeometryType.width | GeometryType.height |
                                                     GeometryType.percent | GeometryType.xypercent | GeometryType.area;

        public ResizeOperator()
        {
            name="Resize";
            description = "Resizes a given image";
            instruction="-resize";
            iconPath = @"Images\resize.png";
            argument = new GeometryArgument(possibleGeometryTypes, GeometryType.percent) {Area = 20};
            possiblePrograms = Program.convert | Program.mogrify;
            position = Position.Between;
            settings=new List<Setting>();

            argument.PropertyChanged += new PropertyChangedEventHandler(OnArgumentChanged);

            ((GeometryArgument) argument).Scale = 50;
        }
    }
}
